package lumis.portal.report;

import lumis.portal.PortalException;
import lumis.portal.PortalObjectNotFoundException;

/**
 * Provides report related operations.
 *
 * @depend - manages - ReportType
 * @depend - manages - Report
 * 
 * @version $Revision: 9601 $ $Date: 2008-07-18 15:38:17 -0300 (Fri, 18 Jul 2008) $
 * @since 4.2.0
 */
public interface IReportManager 
{
	// -- Report -- //
	
	/**
	 * Returns the report with the given identifier.
	 * @return the report.
	 * @throws PortalObjectNotFoundException if no report exists with the given
	 * identifier.
	 */
	public Report getReport(String reportId) throws PortalException;
	
	// -- ReportType -- //
	
	/**
	 * Returns the report type with the given identifier.
	 * @return the report type .
	 * @throws PortalObjectNotFoundException if no report type exists with 
	 * the given identifier.
	 */
	public ReportType getReportType(String reportTypeId) throws PortalException;
	
	/**
	 * Registers a new report type.
	 * @param baseUrl the path to the report type definition folder, 
	 * relative to lumisdata/def.
	 * @since 4.2.0
	 */
	public void register(String baseUrl) throws PortalException;
	
	/**
	 * Unregisters a report type.
	 * @param reportType the report type.
	 * @since 4.2.0
	 */
	public void unregister(ReportType reportType) throws PortalException;

	/**
	 * Registers all Portal's default report types.
	 * @since 4.2.0
	 */
	public void registerDefaultTypes() throws PortalException;
}
